<#-- Macro define --
-- @author pzp
-- @date 2015-11-19
-->

<#macro GctrlIdentity ident>
	case ${ident}
	when '研究生'  then 'G'
	when '教工' then 'T'
	when '教师' then 'T'
	when '职工' then 'T'
	when '老师' then 'T'
	when '未知'     then 'O'
	when '未知身份' then 'O'
	else 'U' end
</#macro>

<#macro GctrlAcademy acade>
	<#assign acaList=[
		{"names": ["医学"], "id":13},
		{"names": ["公共管理","公共事业管理","社会工作"], "id":16},
		{"names": ["理学院","数学","物理","理工","信息与计算"], "id":18},
		{"names": ["国际经济", "国际时装"], "id": 22},
		{"names": ["电子信息","控制理论"], "id":28},
		{"names": ["建筑","土木工程"], "id":33},
		{"names": ["工程管理","工商管理", "管理科学","经贸与管理","人力资源","市场营销","行政管理"], "id": 38},
		{"names": ["环境","资源"], "id":40},
		{"names": ["通信工程","信息科学","信号","信息电子","信息管理","信息学院"], "id":42},
		{"names": ["经管","经济管理","金融","经济学"], "id":46},
		{"names": ["汉语","人文","马克思"], "id":49},
		{"names": ["药学"], "id":52},
		{"names": ["教育学院"], "id":109},
		{"names": ["法学", "法政", "会计"], "id":111},
		{"names": ["生命科学","生物技术"], "id":118},
		{"names": ["继续教育学院"], "id":143},
		{"names": ["外国语","外语","英语"], "id":314},
		{"names": ["农学"], "id":328},
		{"names": ["传媒","文化传播"], "id":330},
		{"names": ["动科"], "id":332},
		{"names": ["计算机"], "id": 1213},
		{"names": ["软件"], "id":1512},
		{"names": ["求是"], "id":1659},
		{"names": ["包装","机械","工业工程", "工业设计","过程装备","机电","机控","流体机械","自动化"], "id":4046},
		{"names": ["材料","化学","轻化工程"], "id":4074}
	]/>
	case
	<#list acaList as a>
	<#assign aid = a.id/>
	<#list a.names as name>
	when charindex('${name}', ${acade})!=0 then ${aid}
	</#list>
	</#list>
	else 999999 end
</#macro>